import { request } from "./rquest";
//创建订单
export function createOrder(params) {
    return request({
        url: '/api/orders',
        method: 'post',
        params
    })
}

//获取订单预览
export function getOrderPreview() {
    return request({
        url: '/api/orders/preview',
    })
}

//订单支付,获取二维码
export function payOrder(order, params) {
    return request({
        url: `/api/orders/${order}/pay`,
        params
    })
}

//获取订单状态
export function getOrderStatus(order) {
    return request({
        url: `/api/orders/${order}/status`,
    })
}
//获取订单列表
export function getOederList(params) {
    return request({
        url: '/api/orders',
        params
    })
}
//订单详情
export function getOderDetail(order) {
    return request({
        url: `/api/orders/${order}`,
        method: 'get',
        params: {
            // include: goods, user, orderDetails
        }
    })
}
//获取物流详情
export function viewExpress(order) {
    return request({
        url: `/api/orders/${order}/express`,
        method: 'get',
    })
}